package com.auto.survey.activity.monitoring.entity.relations


import androidx.room.Embedded
import androidx.room.Relation
import com.auto.survey.activity.monitoring.entity.MonitoringPoint
import com.auto.survey.activity.monitoring.entity.MonitoringStation
import com.auto.survey.activity.monitoring.entity.MonitoringObject

/**
 * 监测对象与测站、测点关联类
 * 用于获取监测对象及其关联的所有测站和测点
 */
data class MonitoringWithStationsAndPoints(
    /**
     * 监测对象信息
     */
    @Embedded val monitoring: MonitoringObject,
    /**
     * 监测对象关联的测站列表
     */
    @Relation(
        parentColumn = "id",
        entityColumn = "monitoringObjectId"
    )
    val stations: List<MonitoringStation>,
    /**
     * 监测对象关联的测点列表
     */
    @Relation(
        parentColumn = "id",
        entityColumn = "monitoringObjectId"
    )
    val points: List<MonitoringPoint>
)